import { Service , Inject } from "typedi";
import { AdditionalEntity } from "../entity/additionalEntity";
import {PrincipalEntity} from '../entity/principalEntity'
import { getRepository,getConnection } from "typeorm";


@Service()
export class ClassDao{
    public async getAllPrincipalDao(): Promise<any> {

        return await     getRepository(PrincipalEntity)
                            .createQueryBuilder("principal")
                            .getMany();
    }

    public async getAllAdditionalDao(): Promise<any> {

        return await     getRepository(AdditionalEntity)
                            .createQueryBuilder("additional")
                            .getMany();
    }
}